//===========================================

//Health Bonus Pulse
event HudHealthBonusPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"205"		    Linear 0.0 0.2
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"		        Linear 0.2 0.4

    Animate	PlayerStatusHealthValue 	    FgColor		"Buff"	        Accel 0.0 0.0
	Animate	PlayerStatusHealthValueCam 	    FgColor		"Buff"	        Accel 0.0 0.0
    Animate	PlayerStatusHealthValueSpec 	FgColor		"Buff"	        Accel 0.0 0.0  
	Animate	PlayerStatusHealthValueTour  	FgColor		"Buff"          Accel 0.0 0.0
    
    Animate	HealthBG 	    BgColor		"Positive"	        Accel 0.0 0.0
    Animate	HealthBG 	    Alpha		"255"		        Accel 0.0 0.3
	Animate	HealthBG 	    Alpha		"255"		        Accel 0.3 0.6
	Animate	TargetHPBG 	    BgColor		"Positive"	    Accel 0.0 0.0
    Animate	TargetHPBG 	    Alpha		"255"		        Accel 0.0 0.3
	Animate	TargetHPBG 	    Alpha		"255"		        Accel 0.3 0.6
    Animate	SpecBG 	        BgColor		"Positive"	    Accel 0.0 0.0
    Animate	SpecBG 	        Alpha		"255"		        Accel 0.0 0.3
	Animate	SpecBG 	        Alpha		"255"		        Accel 0.3 0.6

	RunEvent HudHealthBonusPulseLoop	0.6
}

// call to loop HudHealthBonusPulse
event HudHealthBonusPulseLoop
{
	RunEvent HudHealthBonusPulse 0.0
	RunEvent PlayerStatusHealthValue 0.0
	RunEvent PlayerStatusHealthValueCam 0.0
	RunEvent PlayerStatusHealthValueSpec 0.0
	RunEvent PlayerStatusHealthValueTour 0.0
}

event HudHealthBonusPulseStop
{
	StopEvent HudHealthBonusPulse 0.0
	StopEvent HudHealthBonusPulseLoop 0.0
	StopEvent PlayerStatusHealthValue 0.0
	StopEvent PlayerStatusHealthValueCam 0.0
	StopEvent PlayerStatusHealthValueSpec 0.0
	StopEvent PlayerStatusHealthValueTour 0.0

	Animate	PlayerStatusHealthValue 	    FgColor		"Health"	        Accel 0.0 0.0
	Animate	PlayerStatusHealthValueCam 	    FgColor		"Health"	        Accel 0.0 0.0
    Animate	PlayerStatusHealthValueSpec 	FgColor		"Health"	        Accel 0.0 0.0
	Animate	PlayerStatusHealthValueTour  	FgColor		"Health"            Accel 0.0 0.0
    
    Animate	HealthBG 	     BgColor		"Blank"	       Accel 0.0 0.0
    Animate	HealthBG 	     Alpha		    "255"		           Accel 0.0 0.0
	Animate	TargetHPBG 	     BgColor		"Black"	       Accel 0.0 0.0
    Animate	TargetHPBG 	     Alpha		    "255"		           Accel 0.0 0.0
    Animate	SpecBG 	         BgColor		"Black"	       Accel 0.0 0.0
    Animate	SpecBG 	         Alpha		    "255"		           Accel 0.0 0.0
    
}

//===========================================

//Health Dying Pulse
event HudHealthDyingPulse
{
	Animate	PlayerStatusHealthBonusImage 	Alpha		"175"		         Linear 0.0 0.075
	Animate	PlayerStatusHealthBonusImage 	Alpha		"0"		         Linear 0.125 0.075

    Animate	PlayerStatusHealthValue 	    FgColor		"Low"	        Accel 0.0 0.0
	Animate	PlayerStatusHealthValueCam 	    FgColor		"Low"	        Accel 0.0 0.0
    Animate	PlayerStatusHealthValueSpec 	FgColor		"Low"	        Accel 0.0 0.0  
	Animate	PlayerStatusHealthValueTour  	FgColor		"Low"          Accel 0.0 0.0
    
    Animate	HealthBG 	    BgColor		"Negative"	    Accel 0.0 0.0
    Animate	HealthBG 	    Alpha		"255"		        Accel 0.0 0.3
	Animate	HealthBG 	    Alpha		"255"		        Accel 0.3 0.6
	Animate	TargetHPBG 	    BgColor	    "Negative"	    Accel 0.0 0.0
    Animate	TargetHPBG 	    Alpha		"255"		        Accel 0.0 0.3
	Animate	TargetHPBG 	    Alpha		"255"		        Accel 0.3 0.6
    Animate	SpecBG 	        BgColor		"Negative"	    Accel 0.0 0.0
    Animate	SpecBG 	        Alpha		"255"		        Accel 0.0 0.3
	Animate	SpecBG 	        Alpha		"255"		        Accel 0.3 0.6

	RunEvent HudHealthDyingPulseLoop	0.6
}

// call to loop HudHealthDyingPulse
event HudHealthDyingPulseLoop
{
	RunEvent HudHealthDyingPulse 0.0
	RunEvent PlayerStatusHealthValue 0.0
	RunEvent PlayerStatusHealthValueCam 0.0
	RunEvent PlayerStatusHealthValueSpec 0.0
	RunEvent PlayerStatusHealthValueTour 0.0
}

event HudHealthDyingPulseStop
{
	StopEvent HudHealthDyingPulse 0.0
	StopEvent HudHealthDyingPulseLoop 0.0
	StopEvent PlayerStatusHealthValue 0.0
	StopEvent PlayerStatusHealthValueCam 0.0
	StopEvent PlayerStatusHealthValueSpec 0.0
	StopEvent PlayerStatusHealthValueTour 0.0


	Animate	PlayerStatusHealthValue 	    FgColor		"Health"	         Accel 0.0 0.0
	Animate	PlayerStatusHealthValueCam 	    FgColor		"Health"	         Accel 0.0 0.0
    Animate	PlayerStatusHealthValueSpec 	FgColor		"Health"	         Accel 0.0 0.0
	Animate	PlayerStatusHealthValueTour  	FgColor		"Health"             Accel 0.0 0.0
    
    Animate	HealthBG 	     BgColor		"Blank"	        Accel 0.0 0.0
    Animate	HealthBG 	     Alpha		    "255"		            Accel 0.0 0.0
	Animate	TargetHPBG 	     BgColor		"Black"	        Accel 0.0 0.0
    Animate	TargetHPBG 	     Alpha		    "255"		            Accel 0.0 0.0
    Animate	SpecBG 	         BgColor		"Black"	       Accel 0.0 0.0
    Animate	SpecBG 	         Alpha		    "255"		           Accel 0.0 0.0
    
}

//===========================================


event HudLowAmmoPulse {RunEvent LowAmmoPulse 0}
event LowAmmoPulse
{
	Animate	HudWeaponLowAmmoImage		Alpha		"255"		Linear 0.0 0.075
	Animate	HudWeaponLowAmmoImage		Alpha		"0"		Linear 0.125 0.075

    Animate	AmmoInClip		FgColor		"AmmoLow"	         Accel 0.0 0.0
	Animate	AmmoInReserve	FgColor		"AmmoLow"            Accel 0.0 0.0
	Animate	AmmoNoClip		FgColor		"AmmoLow"	         Accel 0.0 0.0
    
	Animate	AmmoBG 	                BgColor		"Blank"	        linear 0.0 0.0
	
	RunEvent HudLowAmmoPulseLoop	0.25
}

event HudLowAmmoPulseLoop
{
	RunEvent HudLowAmmoPulse 0.0
}

event HudLowAmmoPulseStop
{
	StopEvent LowAmmoPulse 0.0
	StopEvent HudLowAmmoPulseLoop 0.0

    Animate	AmmoInClip		FgColor		"Ammo"	         Accel 0.0 0.0
	Animate	AmmoInReserve	FgColor		"AmmoReserve"    Accel 0.0 0.0
	Animate	AmmoNoClip		FgColor		"Ammo"	         Accel 0.0 0.0
    
	Animate	AmmoBG 	                BgColor		"Blank"	        linear 0.0 0.0
}

//===========================================

//====================================

// Flash the medic charge hud when we have full charge

event HudMedicCharged
{
	Animate	MedicBG 	            BgColor		"Uber"		linear 0.0 0.0
	Animate	ChargeMeter 	        FgColor		"UberMeter"		    linear 0.0 0.0
	Animate ChargeLabel             FgColor     "Gray"      linear 0.0 0.0

	RunEvent HudMedicChargedLoop	0.6
}

// call to loop HudHealthBonusPulse
event HudMedicChargedLoop
{
	RunEvent HudMedicCharged 0.0
	RunEvent ChargeLabel 0.0
	RunEvent ChargeMeter 0.0
}

event HudMedicChargedStop
{
	StopEvent HudMedicCharged 0.0
	StopEvent HudMedicChargedLoop 0.0
	StopEvent ChargeLabel 0.0
	StopEvent ChargeMeter 0.0

    Animate	MedicBG 	            BgColor		"Blank"	       linear 0.0 0.0
	Animate	ChargeLabel 	        FgColor		"White"		   linear 0.0 0.0001
	Animate	ChargeMeter 	        FgColor		"White"		   linear 0.0 0.0001
}

//====================================

//
//
//
// commands:
//	Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
//		variables:
//			FgColor
//			BgColor
//			Position
//			Size
//			Blur		(hud panels only)
//			TextColor	(hud panels only)
//			Ammo2Color	(hud panels only)
//			Alpha		(hud weapon selection only)
//			SelectionAlpha  (hud weapon selection only)
//			TextScan	(hud weapon selection only)
//
//		interpolator:
//			Linear
//			Accel - starts moving slow, ends fast
//			Deaccel - starts moving fast, ends slow
//			Spline - simple ease in/out curve
//			Pulse - < freq > over the duration, the value is pulsed (cosine) freq times ending at the dest value (assuming freq is integral)
//			Flicker - < randomness factor 0.0 to 1.0 > over duration, each frame if random # is less than factor, use end value, otherwise use prev value
//
//	RunEvent <event name> <start time>
//		starts another even running at the specified time
//
//	StopEvent <event name> <start time>
//		stops another event that is current running at the specified time
//
//	StopAnimation <panel name> <variable> <start time>
//		stops all animations refering to the specified variable in the specified panel
//
//	StopPanelAnimations <panel name> <start time>
//		stops all active animations operating on the specified panel
//
//  SetFont <panel name> <fontparameter> <fontname from scheme> <set time> 
//
//	SetTexture <panel name> <textureidname> <texturefilename> <set time>
//
//  SetString <panel name> <string varname> <stringvalue> <set time>